﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace eShop.Model
{
    public class Order
    {
        // Order Info
        public int OrderId { get; set; }
        public string OrderNumber { get; set; }
        public DateTime OrderDate { get; set; }
        public OrderStatusType OrderStatus { get; set; }
        public OrderItemCollection OrderItems { get; set; }
        public double SubTotal { get; set; }
        public double TotalWeight { get { return OrderItems.TotalWeight; } }
        public double TotalAmount { get { return this.SubTotal + this.ShippingCost; } }

        // User Info
        public int UserId { get; set; }
        public string Name { get; set; }
        public string EmailAddress { get; set; }
        public string PhoneNumber { get; set; }
        public string SpecialInstruction { get; set; }

        // Shipping Info
        public Address ShippingAddress { get; set; }
        public double ShippingCost { get;  set; }
        public ShippingStatusType ShippingStatus { get; set; }

        // Payment Info
        public PaymentType PaymentType { get; set; }
        public string PaymentStatus { get; set; }
        public string TransectionId { get; set; }

        public Order()
        {
            OrderItems = new OrderItemCollection();
        }
    }
}
